﻿<%@ Page Title="Pay" Language="C#" MasterPageFile="~/site.master" AutoEventWireup="true"
    CodeFile="~/account/pay.aspx.cs" Inherits="Account.account_Pay" %>

<%@ Reference Page="~/Product.aspx" %>
<%@ Reference Page="~/Account/Shoppingcart.aspx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        #content > section
        {
            margin-bottom: 1em;
        }
        
        #sourceInvaildLabel
        {
            font-size: 2em;
        }
        
        h2
        {
            margin-bottom: 0.5em;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="1">
        <asp:View ID="errorView" runat="server">
            <p class="errorText">
                You shall only come to this page from <a href="Shoppingcart.aspx">shopping cart</a>
                page or product page.</p>
        </asp:View>
        <asp:View ID="normalView" runat="server">
            <section>
                <h2>
                    You are going to pay:</h2>
                <div>
                    <asp:SqlDataSource ID="productSource" runat="server" ConnectionString="<%$ ConnectionStrings:ASPNETDBConnectionString %>"
                        OnSelected="productSource_Selected" />
                    <asp:LinqDataSource ID="LinqDataSource1" runat="server" OnSelecting="LinqDataSource1_Selecting" />
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="LinqDataSource1"
                        OnDataBound="GridView1_DataBound">
                        <Columns>
                            <asp:BoundField DataField="ProductName" HeaderText="name" SortExpression="name" />
                            <asp:BoundField DataField="ProductShop" HeaderText="Shop" SortExpression="Shop" />
                            <asp:BoundField DataField="ProductDiscountedPrice" HeaderText="Price" SortExpression="DiscountedPrice" />
                            <asp:BoundField DataField="Quantity" HeaderText="Quantity" SortExpression="Quantity" />
                            <asp:BoundField DataField="coverPhoto" HeaderText="coverPhoto" SortExpression="coverPhoto" />
                        </Columns>
                    </asp:GridView>
                    <div>
                        Total
                        <asp:Label ID="itemCountLabel" runat="server" Text="Label" />
                        item(s).
                    </div>
                </div>
                <asp:Panel ID="productListPanel" runat="server">
                </asp:Panel>
            </section>
            <section>
                <h2>
                    Choose your payment method</h2>
                <asp:RadioButtonList ID="RadioButtonList1" runat="server">
                    <asp:ListItem>Telegraphic transfer </asp:ListItem>
                    <asp:ListItem>Credit card</asp:ListItem>
                    <asp:ListItem Value="Thrid-party">Thrit-party payment</asp:ListItem>
                </asp:RadioButtonList>
            </section>
            <section>
                <input type="button" value="Back" onclick="javascript:history.go(-1);" />
                <asp:Button ID="confirmButton" runat="server" Text="Confirm" OnClick="confirmButton_Click" />
            </section>
        </asp:View>
    </asp:MultiView>
</asp:Content>
